Copyright: WinEject - Version 1.3
Citation: (c) 1997-99 by Ingo Heeskens


Contents

 WinEject

Version 1.3

Introduction

General Information

What's WinEject?

Version history

Archive contents

Legal stuff

WinEject

Automatic Installation

Manual Installation

Using WinEject

Configuring WinEject

Defining Hotkeys

Command Line

WinEject Client/Server

Introduction

Installation

Configuring the server

Using the client

Registration

Registration

Postcard Registration

Paying for WinEject

Frequently Asked Questions

Why can't I eject my A: drive?

I registered, but I didn't get an answer.

My registration key isn't working.

Lock/Unlock doesn't work properly


 WinEject

Version 1.3

Contact:

Ingo Heeskens

Bussardstr. 6

52134 Herzogenrath

- Germany -

E-Mail:

ingo@fivemile.org

heeskens@pool.informatik.rwth-aachen.de

Homepage:

http://www.fivemile.org/ingo/


What's WinEject?

WinEject is a small program to open and close cd-rom drives and to eject other removable media like ZIP drives. It can install an icon in the system tray near to the clock from which you can operate it. You're also able to see whether there's a disk inserted or not. An option let's WinEject eject all media at Windows shutdown, so you won't forget your disks in the drive. There's also a command-line interface allowing you to run WinEject e.g. within a DOS-box or a batch file.

With the WinEject Client/Server program you can eject disks on other computers remotely. It contains a service for Windows NT, that allows WinEject clients running on other computers to eject drives on the computer running the service. This makes for example sense if you want to eject drives on a server where nobody is logged on to (Using the manual eject button may lead to loss of data). This solution also enables users without administrator privileges to eject drives.


Version history

Changes from 1.2 to 1.3:

• supports up to 4 tape devices with Windows NT (can't test it myself, please report errors)

• added "Autostart" feature

• added Installation/Deinstallation

• added WinEject Client/Server program to eject disks on other computers

• added remote computer browser

• displays whether a disk is inserted or not

• automatically saves up to 26 configurations to registry

• added progress window

• added hotkey feature

• added menu for support over the internet

• added "ATX-mode" for eject on shutdown

• added "Safe Mode" feature

• added "lock" feature

• added shaded bar to the menu

• converted the ReadMe to this help file

• some icons included in the archive (If you have designed a nice icon, send it to me and I'll include it in the archive.)

• removed bug "Drive isn't removable"

• removed bug ("open" sometimes didn't work work with double-click)

• removed bug (menu sometimes didn't show up on first click)

Changes from 1.1 to 1.2:

• introduced registration key

• can save one configuration in the registry

• added the possibility to eject other drives than the configured ones via menu

• added the possibility to change the icon

• drive remains accessible under Win NT (didn't work in some configurations)

• some configuration options available at runtime

• added the possibility to eject more than one drive at the same time (user suggestion)

• again a new icon

• removed the need for the mci parameter

• faster eject for cd-rom drives under Win95

• eject at shutdown only when disk inserted (user suggestion)

Changes from 1.01 to 1.1:

• nicer icon

• command-line interface

• autoeject at shutdown feature added

• reduced file size

Changes from 1.0 to 1.01:

• added open/close commands to the menu (user suggestion)


Archive contents

WinEject.zip originally contains these 10 files:

Name	Description
Setup.exe	The setup program
Setup.inf	Needed by the setup program
Readme.txt
File_id.diz	Short description
Wineject.exe	The main WinEject program
Winejsrv.exe	The service for Windows NT
Wineject.hlp	This help file
Wineject.cnt	The content list of the help file
Redarrow.ico	The icon older version.used
Hidenori.ico	Alternative icon, (c) by Hidenori Ishikawa


Legal stuff

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Automatic Installation

In order to install WinEject, just start "setup.exe". This will copy WinEject to your Windows directory and create a program group in the "Start" menu.

If you don't like to have WinEject in your Windows directory, you've to use the manual installation.

If you want to remove WinEject later, you can do so using "Add/Remove Software" from the control panel.


Manual Installation

If you don't want to use the automatic installation, you can still use this way to install WinEject:

• Create a directory to install WinEject in.

• Copy wineject.exe, wineject.hlp and wineject.cnt to this directory.

• Start WinEject by double-clicking on wineject.exe.

If you want to be able to start WinEject from the "Start" menu, you can add it using "Start->Settings->Taskbar & Startmenu".

If you want to remove WinEject later, just remove the directory you installed WinEject in along with it's contents.


Using WinEject

Start WinEject using the entry made in your "Start" menu or by double-clicking on the file wineject.exe. You'll see a new icon in your system tray. Move your mouse cursor over WinEject's icon:

The letter i: in this example means that WinEject will work with this drive. Try to double-click on the icon with the right mouse button. The drive with that drive letter will open. Do a single click on the icon and the drive will close again.

If you click on the icon using the left mouse button a menu will appear:

Choosing "Open" will have the same effect as a double-click on the icon, "Close" is equivalent to a single click on the icon. "Open drive" will popup a menu with all your ejectable drives. If you choose one, this drive will be ejected. "Close drive" will close the selected drive.

In the "Drives" menu you can select or deselect some removable drives. All drives with a checkmark on the left will be ejected/closed.

The "Options" menu will be explained in the next chapter and the "Hotkeys" menu will be explained in this chapter.

"Lock" and "Unlock" are only available if you configured it in the options menu. "Lock" will immediately disable your drives eject button, "Unlock" will enable it again.

Please read this note if you want to use locking.

"Internet" allows you to get some information via internet. You can check for new versions or ask me a question via e-mail.

The other points don't have to be explained, I think :-)


Configuring WinEject

If you choose options from WinEject's menu, you'll see this menu:

Nearly all configuration options for WinEject are available in this menu. If you change the options, the new configuration will automatically saved to the registry. You can create up to 26 different configurations if you start WinEject more than one times. If your restart your computer, the first WinEject started will take the first available configuration, the second started will take the second one and so on.

Startup automatically

If this is checked WinEject will automatically get started if you start Windows.

Safe Mode

If this is checked, WinEject will check whether the drive you want to eject is currently used by another process. If it is, it'll ask if you really want to eject it.

Check for media

If you check this, WinEject will look if you've disks inserted in your removable drives. In the tooltip that'll be displayed if you move the mouse cursor over WinEject's icon empty drives will have a small letter. When a disk is inserted, the corresponding drive letter will be displayed uppercase.

Auto-Lock drive(s)

Checking this will lock all removable drives you selected in the "Drives" menu. You can't use the eject buttons on those drives any more, but WinEject will still be able to open and close them. Unchecking this point will unlock the drives again. The difference to the Lock command in the main menu is that WinEject automatically locks the drive after you opened/closed it with WinEject. If you just select "lock" in the main menu, the drive only remains locked until you open it with WinEject, afterwards it'll be unlocked.

Please read this note if you want to use locking.

Eject on shutdown

If this point is checked, WinEject will eject the drives you selected in the "Drives" menu when you shutdown Windows or log out.

ATX mode

This point is only available if you have "Eject on shutdown" checked. You should check this if your computer turns off power automatically after Windows is shut down. If you don't check it and WinEject ejects a cd-rom drive on Windows shutdown, this drive will remain opened. And since there's no power any more you're not able to close the drive again. Checking this option together with "Eject on shutdown" will open your drives on shutdown and wait a few seconds so you can take out your disks. It'll then close the drive again and the Windows shutdown continues.

Show actions

If you want to see WinEject's status while it ejects or closes drives, check this.

Every time WinEject performs an action, it displays such a window in the middle of the screen. This  window will automatically disappear, when the action is done.

Show lock/unlock commands

When this is checked, WinEject displays two additional items in the main menu that allow you to lock or unlock your drives.

Please read this note if you want to use locking.

Show shaded bar

If you don't like the shaded bar displaying "WinEject" left to the main menu, uncheck this point.

Select remote computer...

This opens a dialog where you can select a computer in your network neighborhood. If the selected computer is running the WinEject service for Windows NT, you can eject the drives on this computer remotely.

Switch to local mode

If you're using WinEject with a remote computer, selecting this point will cause WinEject to operate on local drives again.


Defining Hotkeys

If you choose Hotkeys from WinEject's menu, you'll see this menu:

WinEject can install to Hotkeys, one key that ejects your drives and one key that closes them. In a default installation, pressing the "Alt" and the "Page down" key simultaneously will eject your drive(s). "Alt"+"Page up" closes them.

Instead of the "Alt" key, you can choose to use the "Shift" or "Control" key (or none).

Choosing "Learn keys..." will bring up this window:

Now you can press the keys you want to use instead of "Page up" or "Page down" in the default installation. Press the keys WITHOUT pressing the "Alt", "Shift" or "Control" key, they are configured via the menu. WinEject will try to react on the keys you gave. Sometimes, keys are used by other applications, so WinEject may not work with those keys. No error message is displayed in this case.


Command line

In most cases it's sufficient to start WinEject as described before and configure it using the menu. But you may want to use WinEject for more advanced purposes. Therefore it's possible to access nearly all of WinEject's functions via a command line interface.

This pictures shows one possibility to start WinEject with command line parameters. There are many other ways like for example:

• use the command prompt

• create a shortcut to WinEject and append the parameters to the command line

• use it from within a batch file

Here's a list of all parameters you can use:

xyz

All letters without preceding '-' are interpreted as drive letters. WinEject will open/close all specified drives. If you use dez for example, drives d:, e: and z: will be opened/closed. (The old syntax from versions prior to 1.3 will also work.)

-auto

If you append this parameter, WinEject will eject the specified drive at windows shutdown.

-noicon

Giving this parameter prevents WinEject from installing an icon in the tray. This is useful if you only want to use the -auto feature.

-open

Will open/eject the specified drive immediately and exit.

-close

Will close the specified drive immediately and exit.

-lock

Will lock the specified drive immediately and exit.

Please read this note if you want to use locking.

-unlock

Will unlock the specified drive immediately and exit.

Please read this note if you want to use locking.

-noexit

Prevents WinEject from exiting after -open or –close.

-icon

This parameter gives WinEject another icon to put in the tray. You may design your own icons to use or just "steal" icons from any other applications you've installed. WinEject comes with some sample icons.

Syntax:

-icon:iconfile?iconnr

iconfile should be replaced with path and name of the file where your icon resides. It may not contain any space characters. iconnr is the index of the icon in this file, starting at 0. If you leave out ?iconnr the first icon in the file will be used.

Examples:

wineject -icon:shell32.dll?11

This gives WinEject the 12th icon from the Windows DLL Shell32.

wineject -icon:e:\icons\other.ico

The icon "e:\icons\other.ico" is used.

The currently selected icon will be saved to the registry, so if you want to change WinEject's icon you've to start it one time using this parameter. At the next start, this icon will be used again, even if you don't specify this parameter.


WinEject Client/Server Introduction

WinEject Client/Server

With the WinEject Client/Server solution it's possible to eject drives on remote NT machines from any workstation in the same network. It consists of two parts. The client program is the normal WinEject program. The server, winejsrv.exe, is a service for Windows NT which runs in the background and even if nobody's logged on.

Using this solution has several advantages:

•You can eject drives on computers where nobody is allowed to log on, e.g. backup serves.

•Ejecting is much safer than using the manual eject button, since the drives cache is flushed before ejecting. Using the manual eject button can lead to loss of data on the ejected disk and can corrupt disks inserted after this disk.

•You can install the server and the client on the same machine. This allows users without administrator privileges to eject local drives.


WinEject Client/Server Installation

Installation

To install the WinEject server, move winejsrv.exe to a folder on the computer with the drives you want to eject. Then open a command prompt and go to this folder. Next, type:

winejsrv -install

Open Windows "control panel" and click on Services. You should see something like this:

Now you can start the WinEject server by clicking on "Start". The server will write a log file in the folder you installed it called "winejsrv.log". If you have any troubles, please check this log file.

If you want to remove the service later, just type

winejsrv -remove

on the command line.


Configuring the server

At the moment, there's not much to configure, only this:

By default, every other computer in the network can access the WinEject server and eject drives on it. If you want to change this, you've to create a group called "WinEject". If this group exists, only members of this group are allowed to connect to the server.

If you want to know the current security settings check the log file.

If it looks like this, only members of "WinEject" can access the server. If there would be "NOT using security" instead of "using NT-security" everybody would have access to the server.


Using the client

The client program for the WinEject Server is the normal WinEject program, that was explained in the previous section of this manual. You can select the remote computer via the options menu.

If you start WinEject using the command line, you can start it as follows:

You've to replace yoda with the name of the computer where you want to eject the drives. If you want to connect to a server on the local computer, you can use a single dot as name ('\\.'). Don't forget the two slashes preceding the computer name.

If everything went ok, you should see a new icon in the system tray looking like this:

The next time you start WinEject it is not necessary to supply the computer name again, because it's saved in the registry. Just start it via the "Start" menu or the autostart feature.

Now you can use WinEject as described in the previous section with one restriction: The "ATX mode" feature will not work.


Registration

WinEject is free for private use. You've to pay nothing. Nevertheless you have to register it if you use it for more than 30 days.

Developing WinEject and answering your questions takes a lot of my spare time. To keep me motivated I decided that you should register WinEject.

There are two ways to register:

• You can send me a postcard. Read more about this way here.

• If you don't want to write a postcard or you feel that WinEject is worth more than a postcard you can support the development by sending money. This way is described here.

Once I've received your postcard (or payment), I'll send you a personalized registration key via e-mail along with instructions how to use it. The key will work for all future versions of WinEject, too.

If you use WinEject commercially, you've to use the second method for registration.


Postcard Registration

As I said, WinEject is free for private use, but you've to register. One way of doing this, is to send me a postcard. You should choose a postcard from your home town or region. Write your full name and your e-mail address on it. Then send it to my address:

Ingo Heeskens

Bussardstr. 6

52134 Herzogenrath

- Germany -

Please understand that I don't accept so called virtual postcards or e-mail with attached graphics, it have to be real postcards.

If you like WinEject very much and you want to support the development of WinEject, you should consider to register by paying a small amount for it. This is explained on the next page.


Paying for WinEject

Instead of sending postcards, you can use this way to register. However, using this way is only required if you use WinEject in a commercial environment. Your payment will be handled by a company called "ShareIt!". You can register online on their secure website using Mastercard/Eurocard, Visa, American Express, and Diner's Club

The price for WinEject calculates as follows:

Registration fee	Handling by ShareIt! (+Taxes)	Total
$5.00	$4.00	$9.00

For more details visit ShareIt's website at http://www.shareit.com/. WinEject can be found at http://www.shareit.com/programs/102759.htm.

If you don't like to give your credit card number over the internet, you can use this form for registration.


Registration form

Please print out the following form, and fax or mail it to:

Shareit!

element 5 AG

Sachsenring 69

50677 Koeln

Germany

Phone:          +49-221-2407279

Fax:            +49-221-2407278

E-Mail:         register@shareit.com

US customers may also order by calling 1-800-903-4152 (9am-5pm). No technical support can be

given at this number. US check and cash orders can be sent to our US office at

ShareIt! Inc.

PO Box 844

Greensburg, PA 15601-0844

USA

Registration form for WinEject

Program No.: 102759

Last name: ___________________________________

First name: ____________________________________

Company: ____________________________________

Street and #: ______________________________________

City, State, postal code: ________________________________

Country: _______________________________________

Phone: _____________________________________

Fax: ________________________________________

E-Mail: ______________________________________

How would you like to pay the registration fee of $9:

credit card - wire transfer - EuroCheque - cash

Credit card information (if applicable)

Credit card: Visa - Eurocard/Mastercard - American Express - Diners Club

Card holder: ________________________________

Card No.: ___________________________________

Date of Expiration : ___________________________________

Date / Signature ___________________________


Why can't I eject my A: drive?

WinEject ejects any removable drive - if it has a drive letter and if the eject mechanism doesn't work completely mechanical. In most cases, the A: drive is a normal floppy drive. If you press the eject button, there's a mechanism that ejects your disk. This works without the use of any electronics. WinEject can't press a button, it needs an eject mechanism that is driven electronically. So, it's normal if WinEject can't eject your A: drive.

Now you may ask, why does the A: drive appear in the menu, if WinEject isn't able to eject it? Well, WinEject displays all removable drives since it can't see whether it's able to eject the drive or not. And there are some drives using the letter A: that can be ejected using WinEject (e.g. MO drives). If WinEject would not display the A:, users owning such drives would complain.


I registered, but I didn't get an answer.

This may have two common reasons:

•You registered by sending me a postcard but I wasn't able to read your e-mail address. In that case I can't send you an answer. If you send a postcard and don't receive your key within the next three weeks, just e-mail me (using your correct e-mail address).

•You tried to register using another way as described in this help file. Virtual postcards, e-mails with attached graphics and so on are not valid for registration. In most cases, I'll just ignore them.


My registration key isn't working.

I send the registration key via e-mail. To make the registration as easy as possible, I also send an attached file (wineject.reg). Unfortunately, some mail readers seam to change this file when saving it to disk.

If the registration by double-clicking on this file fails, please open the file with an editor (e.g. Notepad). Move the cursor to the end of the last line and press the return key. Then save the file and try the registration again.

If the registration still fails, you've to try to enter the registration information manually into the registry. To do so, start regedit.exe. In the tree to the left go to

My Computer\HKEY_CURRENT_USER\Software\IngoH\WinEject

If there's a subkey Registration, go there. If not, use "Edit->New->Key" to create a new subkey and name it Registration. The status line at the bottom should now look like:

Next, create two string values, Name and Key, by clicking "Edit->New->String Value" and give them the appropriate values from the e-mail I sent you. Now you should see something like this:

Close regedit.exe and start WinEject. If it still displays "unregistered", please contact me.


Lock/Unlock doesn't work properly.

Lock/Unlock doesn't work properly

Unfortunately, locking drives sometimes doesn't work as expected. There are many different drives, and locking has a different effect on different drives. Here are two problems I had:

•Locking works well, but unlocking has no effect. In this case, choosing "Close" and "Open" in that order sometimes helped to perform unlock.

•Unlocking sometimes ejects the media.

Since those problems are different from drive to drive, there's nothing I can do about it. If you want to use locking, test it for your drives. If it works, ok. If not...